﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Reflection;
using System.Threading.Tasks;
using Experts.DAL;
using Experts.Model;

namespace Experts.BLL
{
    public class UserService
    {
        public bool AddUser(object model)
        {
            int iResult = DALORM.AddSaveBySql(model);
            if (iResult >= 1)
                return true;
            else
                return false;
        }

        public bool UpdateUser(User users)
        {
            return DALORM.Update<User>(users);
        }
        
        public User FindUser(int id) 
        {
            List<User> lstUser = DALORM.Find<User>(id);
            return lstUser[0];
        }
    }
}
